<?php

namespace app\api\controller\spike;

use app\api\BaseController;
use app\api\service\SpikeSessionService;

class SessionController extends BaseController
{
    /**
     * 获取秒杀会场及商品
     * */
    public function index()
    {

        $store_id = $this->request->param('store_id/d');

        if (empty($store_id)){
            return json(['code' => 0, 'msg' => '非法参数!']);
        }

        $spikeSessionInfo = SpikeSessionService::getSpikeSessionList($store_id);

        return json(['code' =>1, 'data' => $spikeSessionInfo,'msg' => '请求成功!']);
    }
}